package com.apes.fn.tms.repository;

import com.apes.fn.tms.model.BranchLine;
import com.apes.fn.tms.model.Vehicle;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BranchLineRepository extends CustomRepository<BranchLine, String> {

    Page<BranchLine> findAllByLineType(String lineType, Pageable pageable);

    @Query(value = "SELECT * FROM tms_branch_line WHERE NAME IN :name ", nativeQuery = true)
    List<BranchLine> findByName(@Param("name") List name);
}
